<div class="container"> 
	<div class="row"> 
		<div class="panel panel-info">
			<div class="panel-heading">
				<div class="panel-title">Bulk Renew</div>
			</div>
			<div class="panel-body">
				<div class="row">
					<div class="col-md-12">
						<div class="well">
							<h3>Bulk Renew</h3>
							<hr style="background:skyblue;height:1px;">
							<div class="row">
								<div class="col-md-12" >
									<form class="form-horizontal" role="form" id="bulkrenew">
										<div class="form-group">
											<label for="inputEmail3" class="col-sm-2 control-label">Domains to Renew </label>
											<div class="col-sm-6">
												<textarea class="form-control" id="domain" name="domain" placeholder="Domain List"></textarea>
												<small class="sNote">Please enter each domain on a new line. Some domains may have restrictions on renewal periods.</small>
												<input type="hidden" name="ProductType" value="renew">
												<input type="hidden" name="ProductId" value="16">
											</div>
										</div>
										<div class="form-group">
											<label for="inputPassword3" class="col-sm-2 control-label">Years to Renew</label>
											<div class="col-sm-6">
												<select style="width:150px;float:left" class="form-control" name="numyears">
													<option selected="selected" value="1">1 yr.</option>
													<option value="2">2 yr.</option>
													<option value="3">3 yr.</option>
													<option value="4">4 yr.</option>
													<option value="5">5 yr.</option>
													<option value="6">6 yr.</option>
													<option value="7">7 yr.</option>
													<option value="8">8 yr.</option>
													<option value="9">9 yr.</option>
													<option value="10">10 yr.</option>
												</select>
											</div>
										</div>
										<hr style="background:skyblue;height:1px;">
										<div class="form-group">
											<div class="col-sm-12">
												<button type="submit" class="btn btn-warning" onclick="return addbulkrenew();">Add To Cart</button>
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>	
			</div>
		</div>
	</div>
</div>
<script>
function addbulkrenew()
{
	$.ajax({
		url: '<?php echo base_url('enom/bulkdomain');?>',
		type: 'post',
		data:  $('#bulkrenew').serialize(),
		dataType: 'json',
		beforeSend: function() {
			$('#processing-modal').modal('show');
		},		
		complete: function() {
			$('#processing-modal').modal('hide');
		},
		success: function(json) {
			if(json['message'])
			{
				$('#ajax_msg').html('<div class="alert alert-success alert-dismissable flashmsg"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>'+ json['message'] + '</div>');
				$('#ajax_msg .flashmsg').delay(5000).fadeOut('slow');
				$('html, body').animate({ scrollTop: 0 }, 'slow'); 
			}
			$.get('<?php echo base_url('enom/viewcart');?>', function(cart){
  				$(".cart_content").html(cart);
			});
		}
	});
	return false;
}
</script>